<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p><a href="/day05_SpringMvcDemo1/loginf">去登录</a>(地址栏转换成loginf)</p>
<p><a href="/day05_SpringMvcDemo1/loginr">去登录</a>(地址栏转换成loginr,之后还会变成最终的login.jsp)</p>
<h1>request done!</h1>
<h2>
    spring mvc 运行原理 --->
    发起请求 --->
    接受请求 --->
    交给模型处理 --->
    模型返回结果 --->
    结果自动渲染一个视图 --->
    将视图返回
</h2>
request<br>
<table border="1px" cellspacing="0" cellpadding="20px">
    <tr>
        <td>姓名</td>
        <td>昵称</td>
    </tr>
    <c:forEach items="${requestScope.users}" var="user">
        <tr>
            <td>
                    ${user.userName}
            </td>
            <td>
                    ${user.nickName}<br>
            </td>
        </tr>
    </c:forEach>
</table>

<hr>
session<br>
<table border="1px" cellspacing="0" cellpadding="20px">
    <tr>
        <td>姓名</td>
        <td>昵称</td>
    </tr>
    <c:forEach items="${sessionScope.users}" var="user">
        <tr>
            <td>
                    ${user.userName}
            </td>
            <td>
                    ${user.nickName}<br>
            </td>
        </tr>
    </c:forEach>
</table>

<hr>
ModelAndView<br>
<table border="1px" cellspacing="0" cellpadding="20px">
    <tr>
        <td>姓名</td>
        <td>昵称</td>
    </tr>
    <c:forEach items="${requestScope.mv}" var="user">
        <tr>
            <td>
                    ${user.userName}
            </td>
            <td>
                    ${user.nickName}<br>
            </td>
        </tr>
    </c:forEach>
</table>

<hr>
ModelMap<br>
<table border="1px" cellspacing="0" cellpadding="20px">
    <tr>
        <td>姓名</td>
        <td>昵称</td>
    </tr>
    <c:forEach items="${requestScope.mp}" var="user">
        <tr>
            <td>
                    ${user.userName}
            </td>
            <td>
                    ${user.nickName}<br>
            </td>
        </tr>
    </c:forEach>
</table>

</body>
</html>
